<?php

namespace App\Services\Ocean\Report;

use App\Common\Helpers\Functions;
use App\Common\Tools\CustomException;
use App\Models\Ocean\Report\OceanPromotionReportModel;
use Illuminate\Support\Facades\DB;

class OceanPromotionReportService extends OceanReportV2Service
{
    /**
     * constructor.
     * @param string $appId
     */
    public function __construct($appId = ''){
        parent::__construct($appId);

        $this->modelClass = OceanPromotionReportModel::class;
    }

    /**
     * @param $accountIds
     * @param $accessToken
     * @param $filtering
     * @param $page
     * @param $pageSize
     * @param array $param
     * @return mixed|void
     * sdk批量获取列表
     */
    public function sdkMultiGetList($accountIds, $accessToken, $filtering, $page, $pageSize, $param = []){
        return $this->sdk->multiGetCustomV2ReportList($accountIds, $accessToken, $filtering, $page, $pageSize, $param);
    }

    /**
     * @param $option
     * @return bool
     * 设置过滤条件
     */
    protected function setFiltering($option){
        /*
        if(!empty($option['status'])){
            $this->filtering['status'] = $option['status'];
        }else{
            $this->filtering['status'] = 'ALL';
        }
       */
        return true;
    }

    /**
     * @return array
     * 获取报表维度
     */
    public function getReprotDimensions(){
        return ["stat_time_hour","cdp_project_id","cdp_promotion_id"];
    }
}
